<?php  	
	require_once("includes/header.php");
	require_once("include_dao.php");		
		
	$dtoNews = new News();
	if (isset($_GET['PkNew'])){
			if($_GET['PkNew'] != '')
		{		
			$dtoNews = DAOFactory::getNewsDAO()->load($_GET['PkNew']);
		}
	}
?>

<div id="mlist">
    <div id="main"><!-- Slidebox -->              
        <div align="center">
            <?php	
				if(isset($_GET["err"])){
					if ($_GET["err"] != ''){
						echo("<marquee>");
						// Mensajes de error 		
							$msn =  msn_error($_GET["err"]);
							echo($msn);
						// Fin de Mensajes de Error			
						echo("</marquee>");
					}
				}
			?> 
            <section class="main">            
                 <form class="form-1" method="post" action="class/core/clsNews.php"> 
                  
                	<input type="hidden" name="PkNew" value="<?php if ($dtoNews->pKNew != '') echo $dtoNews->pKNew; else echo 0; ?>">
                	   	             
                    
                    <p class="field">
                        <input type="text" name="Description" placeholder="Descripcion" maxlength="50" value="<?php echo $dtoNews->description; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    
                    
                    <p align="left" class="field">
                      
  <input name="picturePath" type="file" method="get"  enctype="multipart/form-data" value= ./img/."<?php echo  $dtoNews->picturePath; ?>" />
                 
            </p> 
  
                    
                    <p class="submit">
                        <button type="submit" name="submit">
                        	<i class="icon-pencil icon-large"></i>
                        </button>
                    </p>
                    
                </form>                
            </section> 
            </br></br>          
        </div>    
           
        <div class="clear"></div>
        
    </div>
</div>     

<?php	require_once("includes/footer.php");	?>